<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<%@page import="com.butnet.sqltools.web.Action"%>
<%@page import="com.butnet.sqltools.connection.*"%>
<%@page import="java.sql.Connection" %>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.Map.Entry"%>
<%@page import="java.util.List"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.ResultSetMetaData" %>
<%@page import="java.sql.Statement"%>
<%@page import="java.util.Date"%>
<%@page import="java.io.*"%>
<%@page import="java.sql.Timestamp"%>
<%String name = request.getParameter("name"); %>
<html>
<head>
<title>查询结果</title>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<style type="text/css">
* {
	font-size: 12px;
}
.header {
	font-weight: bold;
	font-style: italic;
	font-size: 14px;
	background-color: #E0E0E0;
}
table tr td {
	height: 25px;
	padding-left: 7px;
	padding-right: 7px;
}
</style>
<script type="text/javascript">
function onout(dom){
	dom.style.backgroundColor='';
}
function onin(dom){
	dom.style.backgroundColor='#c0c0c0';
}
</script>
</head>
<body>
<a href="Action?method=search">返回管理页面</a><br/>
<form action="Action?method=config" method="POST">
配置文件: <input type="text" name="name" value="<%=name==null?"":name %>"/><input type="submit" value="保存"/><br/>
配置内容: <br/>
<%
StringBuffer data = new StringBuffer();
if(name!=null){
	if(!name.startsWith(".conf"))name+=".conf";
	String f = getServletContext().getRealPath("/WEB-INF/config/"+name);
	File file = new File(f);
	data = new StringBuffer();
	if(file.exists()){
		BufferedReader reader = new BufferedReader(new FileReader(file));
		String line = null;
		while((line=reader.readLine())!=null)
			data.append(line).append('\n');
		reader.close();
	}
}
%>
<textarea name="config" style="width:1000px;height:400px"><%=data %></textarea>
</form>
<br/>
例如:<br/>
<textarea style="width:1000px;height:100px" readonly="readonly">
ClassString=com.microsoft.jdbc.sqlserver.SQLServerDriver
ConnectionString=jdbc:microsoft:sqlserver://192.168.40.30:1433;DatabaseName=DB_CustomSMS;
UserName=CustomSMS
PassWord=SqlMsde@InfoxEie2000
</textarea>
</body>
</html>
